import request from '@/utils/request'

// 查询车辆维修与保养列表
export function listRepairMaintain(query) {
  return request({
    // fake:true,
    url: '/repairMaintain/repairMaintain/list',
    method: 'get',
    params: query
  })
}

// 查询车辆维修与保养详细
export function getRepairMaintain(carId) {
  return request({
    url: '/repairMaintain/repairMaintain/' + carId,
    method: 'get'
  })
}
// 查询车辆维修与保养详细
export function getRepairMaintainId(id) {
  return request({
    url: '/repairMaintain/repairMaintain/id/' + id,
    method: 'get'
  })
}
// 新增车辆维修与保养
export function addRepairMaintain(data) {
  return request({
    url: '/repairMaintain/repairMaintain',
    method: 'post',
    data: data
  })
}
// 查询供应商列表(不分页,按类型)
export function getSupplierList(type) {
  return request({
    url: '/supplier/supplier/getList/' + type,
    method: 'get'
  })
}
// 修改车辆维修与保养
export function updateRepairMaintain(data) {
  return request({
    url: '/repairMaintain/repairMaintain',
    method: 'put',
    data: data
  })

}

export function deleteRepairMaintainById(id) {
  return request({
    url: `/repairMaintain/repairMaintain/`+id,
    method: "delete",
  });
}
